package com.oop;

import com.oop.Demo08.Person;
import com.oop.Demo08.Student;

//instanceof
public class Application08 {
    public static void main(String[] args) {
        // 高                 低
//        Person obj = new Student();
//        ((Student) obj).go();
//
//        Student student = (Student) obj;
//        student.go();
        //子类转换为父类，可能丢失自己本来的方法
        Student student = new Student();
        student.go();
        Person person = student;
//        person.go();
    }
}
